//
//  NSObject+Object.h
//  FZAH
//
//  Created by Yoga on 2017/3/27.
//  Copyright © 2017年 zdqk. All rights reserved.
//

#import <Foundation/Foundation.h>


@interface NSArray(Object)
- (id)safeObjectAtIndex:(NSInteger)index;
@end


@interface NSMutableArray(Object)
- (void)safeAddObject:(id)anObject;
- (void)safeInsertObject:(id)anObject atIndex:(NSInteger)index;
- (void)safeRemoveObjectAtIndex:(NSInteger)index;
- (void)safeReplaceObjectAtIndex:(NSInteger)index withObject:(id)anObject;
@end


@interface NSDictionary(Object)
- (id)safeObjectForKey:(id <NSCopying>)aKey;
- (id)safeNumberForKey:(id <NSCopying>)aKey;
- (id)safeStringForKey:(id <NSCopying>)aKey;
- (id)safeJsonObjectForKey:(id <NSCopying>)key;
@end


@interface NSMutableDictionary(Object)
- (void)safeSetObject:(id)anObject forKey:(id <NSCopying>)aKey;
@end

